Adding a Map to a Window Container

Description

Create a dropdown window container with a map. This requires acquiring a Google Map API key from Google.

A map inside a dropdown window container.
A map inside a dropdown window container.

A Window Container with a Map

  1. In the UX Builder on the UX Controls open the 'Data Controls' section. Click on the [Map] option to add a Map Control to the component.

    Am2
  2. Highlight the map control in the controls tree. In the properties list on the right scroll down to the 'Map Properties'. Check the 'Fill container' checkbox, even though a window container has yet to be defined.

    Am3
  3. Next to the Google Maps API key property place the API key that you received from Google's developers website. This key can also be added to the [Project Properties], in which case it will not be necessary to define it here.

    Am4
  4. With the map control highlighted open the 'Containers' menu and click on the [Container] option.

    Am5
  5. In the Container Type list select the 'Window' option. Click the 'Insert Around' button.

    Am6
  6. Highlight the opening window container tag. In the properties list on the right click the [...] button next to the 'Window properties' property in the 'Window Properties' section.

    Am7
  7. In the 'Window Container' dialog set the 'Window type' property to 'Dropdown'.

    Am8
  8. Click the [...] button next the 'Dropdown Window position' property and select the 'Relative' radio button option. Click OK and return to the 'Window Container' dialog.

    Am9
  9. Uncheck the 'Window title show' checkbox.

    Am10
  10. Set the 'Window height' and 'Window width' properties to '3in'.

    Am11
  11. Uncheck the 'Window is resizable' checkbox.

    Am12
  12. Check the 'Has pointer icon' checkbox. Click OK to close the Window Container dialog.

    Am13
  13. Highlight the window end tag, [Window End:WINDOW_1]. Open the 'Other Controls' click on the [Button] option to add a button control to the component.

    Am14
  14. Highlight the button control. In the properties list on the right set the 'Button text' to read 'Map'.

    Am15
  15. Scroll down to the 'Javascript' section and click on the [...] button next to the 'onClick' property.

    Am16
  16. Set the editing mode to the 'Action Javascript' radio button. Click the 'Add New Action' button.

    Am17
  17. Type 'show' into the 'Filter list' control and select the 'Show Container Window' option. Click OK.

    Am18
  18. In the 'Display Window' dialog set the 'Container ID' property to be 'WINDOW_1'. Click OK, OK, and click 'Save'.

    Am19
  19. Run the component in Live Preview. Click the 'Map' button, the map should be displayed.

    Am20

See Also